/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GUIPrincipal.java
 *
 * Created on 25/08/2011, 08:57:17
 */
package sisgea.view;

import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JFrame;

/**
 *
 * @author Usuario
 */
public class GUIPrincipal extends javax.swing.JFrame {
    
    /** Creates new form GUIPrincipal */
    public GUIPrincipal() {
        initComponents();
        this.setExtendedState(JFrame.MAXIMIZED_BOTH);
        SimpleDateFormat format = new SimpleDateFormat( "dd/MM/yyyy" ); // Gera Data Automaticamente
//            lblData.setText( format.format( new Date() ) );
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        menuBar = new javax.swing.JMenuBar();
        menuArquivo = new javax.swing.JMenu();
        itemMenuSair = new javax.swing.JMenuItem();
        menuCadastro = new javax.swing.JMenu();
        menuModulos = new javax.swing.JMenu();
        itemMenuTecFlorestal = new javax.swing.JMenuItem();
        itemMenuViveiro = new javax.swing.JMenuItem();
        menuRelatorios = new javax.swing.JMenu();
        menuAjuda = new javax.swing.JMenu();
        itemMenuSobre = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("SISGEA");

        menuArquivo.setMnemonic('f');
        menuArquivo.setText("Arquivo");

        itemMenuSair.setMnemonic('x');
        itemMenuSair.setText("Sair");
        itemMenuSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuSairActionPerformed(evt);
            }
        });
        menuArquivo.add(itemMenuSair);

        menuBar.add(menuArquivo);

        menuCadastro.setText("Cadastro");
        menuBar.add(menuCadastro);

        menuModulos.setText("Modulos");

        itemMenuTecFlorestal.setText("Tecnologia Florestal");
        itemMenuTecFlorestal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuTecFlorestalActionPerformed(evt);
            }
        });
        menuModulos.add(itemMenuTecFlorestal);

        itemMenuViveiro.setText("Viveiro");
        menuModulos.add(itemMenuViveiro);

        menuBar.add(menuModulos);

        menuRelatorios.setText("Relatorios");
        menuBar.add(menuRelatorios);

        menuAjuda.setMnemonic('h');
        menuAjuda.setText("Ajuda");

        itemMenuSobre.setMnemonic('a');
        itemMenuSobre.setText("Sobre");
        itemMenuSobre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemMenuSobreActionPerformed(evt);
            }
        });
        menuAjuda.add(itemMenuSobre);

        menuBar.add(menuAjuda);

        setJMenuBar(menuBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 614, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 451, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents


    
    private void itemMenuSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuSairActionPerformed
        System.exit(0);
    }//GEN-LAST:event_itemMenuSairActionPerformed

private void itemMenuSobreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuSobreActionPerformed
    if ((guiSobre == null) || (!guiSobre.isVisible())) {
        guiSobre = new GUISobre();

        guiSobre.setPosicao();
        guiSobre.setVisible(true);
    }
}//GEN-LAST:event_itemMenuSobreActionPerformed


private void itemMenuTecFlorestalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemMenuTecFlorestalActionPerformed
//    Experimento();
//    if ((guiExperimento == null) || (!guiExperimento.isVisible())) {
//        guiExperimento = new GUIExperimento();
//        //desktopPane.add(guiSobre);
//       // guiExperimentoconsultateste.setPosicao();
//        guiExperimento.setVisible(true);
//    }
 
       new GUIExperimento().setVisible(true);
}//GEN-LAST:event_itemMenuTecFlorestalActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem itemMenuSair;
    private javax.swing.JMenuItem itemMenuSobre;
    private javax.swing.JMenuItem itemMenuTecFlorestal;
    private javax.swing.JMenuItem itemMenuViveiro;
    private javax.swing.JMenu menuAjuda;
    private javax.swing.JMenu menuArquivo;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JMenu menuCadastro;
    private javax.swing.JMenu menuModulos;
    private javax.swing.JMenu menuRelatorios;
    // End of variables declaration//GEN-END:variables
    private GUISobre guiSobre;
    //private GUIExperimento guiExperimento;
    //private GUIExperimentoconsultateste guiExperimentoconsultateste;
}
